home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor2 / bond.doc < prev    next >
Internet Message Format  |  1995-03-31  |  10KB

  1. From: Chris Tham 
  2. Subj: Bond Pricing Application 
  3. Date: 25 Nov 91 
  4.  
  5. HP-48SX Bond pricing application Version 1.0 
  6. Copyright (C) 1991 Chris Tham (christie@extro.ucc.su.oz.au) 
  7.  
  8. Introduction 
  9.  
  10. The BOND application allows your HP-48SX to act as a sophisticated bond 
  11. pricing calculator, with features above and beyond that incorporated in 
  12. most financial calculators, including ones manufactured by 
  13. Hewlett-Packard.  Indeed, it has features similar to bond pricing 
  14. programs normally found on personal computers but retains the ease of 
  15. use and flexibility of keystroke oriented bond pricing functions found 
  16. on financial calculators. 
  17.  
  18. The BOND application has the following features: 
  19. * Continuous display of all relevant bond pricing parameters (settlement 
  20.   and maturity dates, coupon and yield rates, bond price) on screen 
  21.   during data entry. 
  22. * Calculates bond price using the Reserve Bank of Australia pricing 
  23.   formulae, with extensions to support bonds with different coupon 
  24.   payment frequencies and ex-interest periods. 
  25.   The RBA bond pricing formula is compatible with the Securities 
  26.   Industry Association's recommendations. 
  27. * User can view the RBA bond pricing parameters (i, y, g, x, n, f, d) 
  28.   on screen to verify correct calculation. 
  29. * Bond pricing is compatible with the bond functions available on the 
  30.   Hewlett-Packard range of financial calculators (including the HP-12C). 
  31. * Calculation of bond price, capital price, accrued interest, implied 
  32.   yield, implied coupon, duration, modified duration, convexity, 
  33.   dispersion, PVBP (Price Value for a Basis Point change in yield). 
  34.  
  35. How to use the BOND Application 
  36.  
  37. The BOND application is normally stored in a subdirectory on the HP-48SX 
  38. called `BOND'.  To use the application, simply enter the directory and 
  39. either type the `GO' command or press the [VAR] menu key and then press 
  40. the soft key marked [GO] (this should be the left most soft key if you 
  41. have not created any variables in this directory).  The screen should 
  42. now display something like the following: 
  43.  
  44.                  úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  45.                  3                                   3 
  46.                  3{ HOME BOND }                      3 
  47.                  3ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ3 
  48.                  3                                   3 
  49.                  3Settlement 22-Nov-1991             3 
  50.                  3Maturity   15-Nov-2000             3 
  51.                  3Coupon     12.00%                  3 
  52.                  3Yield      10.500%                 3 
  53.                  3Bond Price 108.812                 3 
  54.                  ~AÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄ' 
  55.                  3SETTL3MATU 3 CPN 3YIELD3PRICE3 RBA 3 
  56.                  ~AÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄ' 
  57.                  àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  58.  
  59. The soft keys at the bottom corresponds to keys for 
  60. * SETTLement date 
  61. * MATUrity date 
  62. * CouPoN rate per annum 
  63. * YIELD of bond if held to maturity 
  64. * Bond Gross (Total) PRICE 
  65. * RBA (Reserve Bank of Australia) Pricing Parameters 
  66.  
  67. If you press the [NXT] (Next Menu) key, the soft menus will successively 
  68. show the following soft keys: 
  69. * [CAPL] (Calculate bond capital price) 
  70. * [ACCR] (Calculate bond accrued interest) 
  71. * [DUR] (Calculate bond duration) 
  72. * [MDUR] (Calculate bond Modified duration) 
  73. * [CONV] (Calculate bond convexity) 
  74. * [DISPR] (Calculate bond dispersion) 
  75. * [PVBP] (Calculate change in bond Price Value per 1 Basis Point change in 
  76.   yield) 
  77. * [FREQ] (Change coupon frequency per annum) 
  78. * [EXINT] (Change coupon ex-interest period) 
  79.  
  80. The settlement date is entered into the system by typing in a date as a 
  81. number of the form DD.MMYYYY or MM.DDYYYY (depending on flag -42 in the 
  82. calculator) and then pressing the [SETTL] key.  The display should 
  83. automatically update to show the new settlement date.  The calculator 
  84. does not check that the settlement date falls on a business day, or even 
  85. if it is in the right format, so be careful.  Entering a nonsensical 
  86. date will cause the program to crash. 
  87.  
  88. The maturity date of the bond is similarly entered into the system by 
  89. typing in the date in the current HP-48SX date format and then pressing 
  90. the [MATU] key.  The display will automatically update to show the new 
  91. maturity date. 
  92.  
  93. The annual coupon rate must be entered as a percentage and then followed 
  94. by the [CPN] key.  The system displays coupon rates to 2 decimal places. 
  95.  
  96. The desired or actual yield to maturity of the bond must be entered as a 
  97. percentage followed by the [YIELD] key.  The system displays yields to 
  98. three decimal places. 
  99.  
  100. The bond gross price per $100 face value is entered into the system by 
  101. typing in the price and then pressing the [PRICE] key.  The system 
  102. displays the price to 3 decimal places. 
  103.  
  104. To calculate the bond price, implied yield or implied coupon, enter the 
  105. remaining (known) parameters as outlined above and then calculate the  
  106. unknown parameter by pressing the appropriate key preceeded by the left 
  107. (orange) shift key. 
  108.  
  109. To retrieve the current value of any parameter, press the appropriate 
  110. key preceeded by the right (blue) shift key. 
  111.  
  112. Let's run through the examples given in the HP-12C Owner's Handbook and 
  113. Problem-Solving Guide (Reorder Number 00012-90001 Edition 1, Copyright 
  114. (C) Hewlett-Packard Company 1982, July 1987) on pages 76-78. 
  115.  
  116. Example 1: 
  117. What price should you pay on April 28, 1982 for a 6 3/4% US Treasury 
  118. bond that matures on June 4, 1996, if you want a yield of 8 1/4%? 
  119.  
  120. Lets assume our current date format is DD.MMYYYY.  Key sequence will be 
  121. 28.041982 [SETTL] 
  122. 4.061996 [MATU] 
  123. 6 [SPC] 3 [SPC] 4 / + [CPN] 
  124. 8 [SPC] 1 [SPC] 4 / + [YIELD] 
  125. [Left Shift] [PRICE] 
  126.  
  127. The screen will show: 
  128.  
  129.                  úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  130.                  3                                   3 
  131.                  3{ HOME BOND }                      3 
  132.                  3ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ3 
  133.                  3                                   3 
  134.                  3Settlement 28-Apr-1982             3 
  135.                  3Maturity   4-Jun-1996              3 
  136.                  3Coupon     6.75%                   3 
  137.                  3Yield      8.250%                  3 
  138.                  3Bond Price 90.311                  3 
  139.                  ~AÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄ' 
  140.                  3SETTL3MATU 3 CPN 3YIELD3PRICE3 RBA 3 
  141.                  ~AÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄ' 
  142.                  àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  143.  
  144. Hence, the total bond price is $90.311 per $100 face value (including 
  145. accrued interest).  Note that although the bond price is given to three 
  146. decimal places the full precision is stored internally.  To find out 
  147. the capital and accrued interest components, press the [NXT] key.  The 
  148. screen will clear and the soft keys will now say [CAPL] [ACCR] [DUR] 
  149. [MDUR] [CONV] [DISPR].  Press the [CAPL] key, then the [ACCR] key. 
  150. Depending on the setting of your numeric display format (mine is on FIX 
  151. 2) you should get something like "Capital: 87.62" on level 2 of your 
  152. stack and "AccrInt: 2.69" on level 1.  Pressing the [PREV] key ([Left 
  153. Shift] [NXT]) will bring you back to the previous soft key menu and 
  154. pressing [Left Shift] [SETTL] will restore the screen display of bond 
  155. parameters. 
  156.  
  157. The RBA pricing parameters for the above bond can be obtained by 
  158. pressing the [RBA] key which should show something like: 
  159.  
  160.                  úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  161.                  3n 28                               3 
  162.                  3f 37                               3 
  163.                  3d 182                              3 
  164.                  3x 1                                3 
  165.                  3g 3.375                            3 
  166.                  3i .04125                           3 
  167.                  3v .960384153661                    3 
  168.                  ~AÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄâÄÄÄÄÄ' 
  169.                  3SETTL3MATU 3 CPN 3YIELD3PRICE3 RBA 3 
  170.                  ~AÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄáÄÄÄÄÄ' 
  171.                  àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  172.  
  173. Pressing any key (except the [ON] key, of course!) will restore the bond 
  174. parameter screen. 
  175.  
  176. Example 2: 
  177. The market is quoting 88 3/8% for the bond described in Example 1.  What 
  178. yield will that provide? 
  179.  
  180. We first need to find the gross price corresponding to the quoted 
  181. capital price, then we can find the implied yield.  The key sequence is 
  182. 88 [SPC] 3 [SPC] 8 / + 
  183. [NXT] [ACCR] + [PREV] [PRICE] 
  184. [Left Shift] [YIELD] 
  185.  
  186. After a few seconds, the display will show that the corresponding yield 
  187. is 8.151%. 
  188.  
  189. To calculate bond characteristics such as duration, modified duration, 
  190. convexity, dispersion, and PVBP simply press the appropriate key. 
  191. For the bond given in example 2, the relevant values are 
  192. Duration = 8.71 
  193. Modified Duration = 8.37 
  194. Convexity = 98.66 
  195. Dispersion = 5.16 
  196. PVBP = 0.08 
  197. Note that PVBP/PRICE * 10,000 approximately equals the Modified 
  198. duration.  This is a consequence of the method used to calculate 
  199. Modified duration. 
  200.  
  201. The last two soft keys ([FREQ] and [EXINT]) allows you to change the 
  202. coupon payment frequency per annum and ex interest period of the bond. 
  203. By default, FREQ = 2 and EXINT = 15.  Pressing either [FREQ] or [EXINT] 
  204. will display the current settings of FREQ and EXINT respectively.  To 
  205. enter a new coupon frequency, just type the number of coupon payments 
  206. per year and press [Left Shift]  [FREQ] and to enter a new ex interest 
  207. period, just type the minimum number of days to the next interest period 
  208. from settlement date before the bond goes ex-interest then press 
  209. [Left Shift] [EXINT]. 
  210.  
  211. The BOND application currently does not handle bonds calculated on a 
  212. 30/360 day basis. 
  213.